home *** CD-ROM | disk | FTP | other *** search
- Path: mayne.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: IPC Question
- Date: 1 Apr 1996 19:19:30 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4jq6c2INN9gm@mayne.ugrad.cs.ubc.ca>
- References: <31606E63.2F20@cybernex.net>
- NNTP-Posting-Host: mayne.ugrad.cs.ubc.ca
-
- In article <31606E63.2F20@cybernex.net>,
- Frank Rachel <frachel@cybernex.net> wrote:
- >What is the best way to do the following: I want to have a "control" program send
- >data to another program for processing. Basically, I will have 'x' copies of a
- >program running, and they will just sit there waiting until the control programs
- >sends them information to process. This is going to be done under AIX 3.2. Any
- >suggestions would be greatly appreciated.
-
- If this is within one machine, you are going to have to implement a totally
- ordered atomic multicast. This means that either all the processes get all
- broadcast messages from the central server int he right order, or the whole
- thing goes up in a mushroom cloud.
-
- To make sure that processes respond to messages as soon as possible, you need a
- hand-optimized assembly-language polling loop. I suggest you use linux, because
- x86 assembly is far easier and better understood than POWER. (Or was that
- AIX/370? In that case, disregard the following).
-
- /* poll.S */
-
- #include <sys/syscall.h>
-
- .text
- .globl _poll
-
- _poll:
- movl $SYS_read, %eax
- movl $buffer, %ebx
- movl $size, %ecx
- int $0x80
- jmp _poll
- ret
- --
-
-